package lambda;

import java.io.File;
import java.io.FileFilter;

public class LambdaDemo {
    public static void main(String[] args) {
        FileFilter filter = new FileFilter() {
             public boolean accept(File pathname) {
           return pathname.getName().endsWith(".txt");
        }
    };
    FileFilter filter1 = (File file) -> {return file.getName().endsWith(".txt");};
    FileFilter filter2 = file1 -> file1.getName().endsWith(".txt");
    FileFilter filter3 = f->f.getName().endsWith(".txt");
    File file = new File(".");
    file.listFiles(f->f.getName().startsWith("test"));
}
}